package com.glls.customer.feign;

import com.glls.common.R;
import com.glls.common.entity.Goods;
import com.glls.customer.feign.fallback.SearchFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;





@FeignClient(value = "service-search",fallback = SearchFeignClientFallBack.class)
public interface SearchFeignClient {


    @RequestMapping("/search/findGoodsById")
    public Goods search(@RequestParam("id") Integer id);




    @PostMapping(value = "/search/searchByEntity")
    public R searchGoodsList(@RequestBody Goods goods);


    @PostMapping("/search/save")
    public Map save(@RequestBody Goods goods);
    @PostMapping("/search/update")
    public Map update(@RequestBody Goods goods);

    @GetMapping("/search/delete")
    public Map deleteById(@RequestParam("id") Integer id);
    @GetMapping(value = "/search/{id}")
    public Goods findJifenById(@PathVariable(value = "id") Long id);


}
